package ooday02;

public class InterfaceDemo {
    public static void main(String[] args) {
        //Inter o = new Inter();//编译错误，接口是抽象的， 无法实例化
    }

}

interface Inter {
    abstract void show();

    void test();

    //void say(){};
}

class InterImpl implements Inter {
    public void show(){
        //重写接口中的抽象方法时,必须加public
    }
    public void test(){

    }

}

//演示接口的多实现：
interface Inter1{
    void show();
}
interface Inter2{
    void test();
}

abstract class Eoo{
    abstract void say();
}
class Foo extends Eoo implements Inter1, Inter2{
    public void show(){}
    public void test(){}
    void say(){}
}

interface Inter3{
    void show();

}
interface Inter4 extends Inter3{
    void test();
}
class Goo implements Inter4{

    public void test(){}
    public void show(){}

}




